package com.cgq.pro.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cgq.base.service.impl.BaseServiceImpl;
import com.cgq.pro.dao.EcityDao;
import com.cgq.pro.entity.Ecity;
import com.cgq.pro.service.EcityService;

@Service
public class EcityServiceImpl extends BaseServiceImpl<Ecity> 
	implements EcityService {

	private EcityDao ecityDao;
	
	@Autowired
	public void setEcityDao(EcityDao ecityDao) {
		this.ecityDao = ecityDao;
		this.baseDao=ecityDao;
	}

	public List<Ecity> findAll() {
		return ecityDao.findAll();
	}

	public Ecity getCurrentCity() {
		List<Ecity> list=findAll();
		if(list!=null && list.size()>0)
			return list.get(0);
		return null;
	}
	
}
